From 5b6313f16f508882a0ea67716b7dbaa1c6967f04 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Mon, 30 Jun 2025 08:28:13 +0000
Subject: (대표님) 20250630 16시 - 유저 도메인별 라우터 분리와 보안성검토 대응
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 app/[lng]/engineering/(engineering)/b-rfq/page.tsx | 79 ++++++++++++++++++++++
 1 file changed, 79 insertions(+)
 create mode 100644 app/[lng]/engineering/(engineering)/b-rfq/page.tsx

(limited to 'app/[lng]/engineering/(engineering)/b-rfq/page.tsx')

diff --git a/app/[lng]/engineering/(engineering)/b-rfq/page.tsx b/app/[lng]/engineering/(engineering)/b-rfq/page.tsx
new file mode 100644
index 00000000..a66d7b58
--- /dev/null
+++ b/app/[lng]/engineering/(engineering)/b-rfq/page.tsx
@@ -0,0 +1,79 @@
+import * as React from "react"
+import { Metadata } from "next"
+import { type SearchParams } from "@/types/table"
+import { getValidFilters } from "@/lib/data-table"
+import { Shell } from "@/components/shell"
+import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton"
+import { searchParamsRFQDashboardCache } from "@/lib/b-rfq/validations"
+import { getRFQDashboard } from "@/lib/b-rfq/service"
+import { RFQDashboardTable } from "@/lib/b-rfq/summary-table/summary-rfq-table"
+
+export const metadata: Metadata = {
+  title: "견적 RFQ",
+  description: "",
+}
+
+interface PQReviewPageProps {
+  searchParams: Promise<SearchParams>
+}
+
+export default async function PQReviewPage(props: PQReviewPageProps) {
+  const searchParams = await props.searchParams
+  const search = searchParamsRFQDashboardCache.parse(searchParams)
+  const validFilters = getValidFilters(search.filters)
+
+  // 기본 필터 처리 (통일된 이름 사용)
+  let basicFilters = []
+  if (search.basicFilters && search.basicFilters.length > 0) {
+    basicFilters = search.basicFilters
+    console.log("Using search.basicFilters:", basicFilters);
+  } else {
+    console.log("No basic filters found");
+  }
+
+  // 모든 필터를 합쳐서 처리
+  const allFilters = [...validFilters, ...basicFilters]
+  
+  // 조인 연산자도 통일된 이름 사용
+  const joinOperator = search.basicJoinOperator || search.joinOperator || 'and';
+
+  // Promise.all로 감싸서 전달
+  const promises = Promise.all([
+    getRFQDashboard({
+      ...search,
+      filters: allFilters,
+      joinOperator,
+    })
+  ])
+
+  console.log(search, "견적")
+
+  return (
+    <Shell className="gap-4">
+      <div className="flex items-center justify-between space-y-2">
+        <div className="flex items-center justify-between space-y-2">
+          <div>
+            <h2 className="text-2xl font-bold tracking-tight">
+            견적 RFQ
+            </h2>
+          </div>
+        </div>
+      </div>
+      
+      {/* Items처럼 직접 테이블 렌더링 */}
+      <React.Suspense 
+        fallback={
+          <DataTableSkeleton
+            columnCount={8}
+            searchableColumnCount={2}
+            filterableColumnCount={3}
+            cellWidths={["10rem", "15rem", "12rem", "12rem", "8rem", "8rem", "10rem", "8rem"]}
+            shrinkZero
+          />
+        }
+      >
+        <RFQDashboardTable promises={promises} />
+      </React.Suspense>
+    </Shell>
+  )
+}
\ No newline at end of file
-- 
cgit v1.2.3

